import React, {PureComponent} from "react"
import {Button} from "antd"
import notFound from "../../../images/svg/404-error.svg"
import "./index.less"
import {withRouter} from "react-router"
import HomeOutlined from "@ant-design/icons/lib/icons/HomeOutlined"

export default @withRouter class NotFound extends PureComponent {
	render() {

		return (
			<div className={'page-404'}>
				<div className={'page-404-box'}>
					<div className={'page-404-icon'}>
						<img alt={''} src={notFound}/>
					</div>
					<div className={'page-404-h1 primary-text'}>
						访问的资源不在
					</div>
					<div>

					</div>
					<div>
						<Button size={'large'} type={'primary'} onClick={this.toAppend}>
							<HomeOutlined /> 回到首页
						</Button>
					</div>
				</div>
			</div>
		)
	}

	toAppend = () => {
		const {history, match} = this.props
		history.push(`/app/profile`)
	}
}